
#ifndef KEY_H
#define KEY_H  

#include "GPIO.h"

//???
#define K1 P51
#define K2 P52
#define K3 P53
#define K4 P54

#define UP 1//??
#define DOWN 0//??
// s ???last??
// ss ?????
#define IS_DOWN(s,ss)  (s & (1<<ss))==0 
#define IS_UP(s,ss)   (s & (1<<ss)) != 0 

#define get_k_down(s,ss)   s &= ~(1<<ss)
#define get_k_up(s,ss)  s |= 1<<ss

//?? ???? IO????
void Key_Init(void);

//??????
void Key_Scan(void *down(u8));


#endif // KEY_H